package o;

import android.content.Context;
import com.huawei.appgallery.forum.user.menu.MenuLinearLayout;
import o.cbr.b;

public class cbt {
    private static cbt ˊ;

    public static synchronized cbt ˋ() {
        cbt o_cbt;
        synchronized (cbt.class) {
            if (ˊ == null) {
                ˊ = new cbt();
            }
            o_cbt = ˊ;
        }
        return o_cbt;
    }

    private cbt() {
    }

    public void ˎ(MenuLinearLayout menuLinearLayout, b bVar) {
        if (menuLinearLayout != null) {
            menuLinearLayout.removeAllViews();
            cbs ˎ = ˎ(menuLinearLayout.getContext());
            if (ˎ != null) {
                ((cbr) ˎ).ॱ(bVar);
                ˎ.ˎ(menuLinearLayout.getContext(), menuLinearLayout);
            }
        }
    }

    private cbs ˎ(Context context) {
        try {
            return (cbs) cbr.class.getConstructor(new Class[0]).newInstance(new Object[0]);
        } catch (Exception e) {
            bqx.ॱ("MenuFactory", "getMenuList failed ");
            return null;
        }
    }
}
